<script setup>
import { Edit } from "@element-plus/icons-vue";
import { inject } from "vue";

const data1=inject("data1")
const data=[{
  "index":"1",
  "name":"重量",
  "PLC":"1",
  "model":"范围检测",
  "calibration":"350-450"
}]
console.log(data1)
</script>
<template>
<el-row align="center" class="row1">
  <el-col :span="3" align="center">
    <h3>【LD001】</h3>
  </el-col>
  <el-col :span="20" align="right" style="mar">
    <el-button type="success">添加新属性</el-button>
  </el-col>
  <el-row style="width: 100%;margin: 0px auto;">
        <el-col :span="24">
          <!-- data、click需要更改 -->
          <el-table :data="data" stripe border style="width:100%">
            <el-table-column label="序号" align="center" prop="index" :index="indexMethod" width="100px" />
            <el-table-column label="属性名称" align="center" prop="name" :index="indexMethod" width="200px" />
            <el-table-column label="PLC标识" align="center" prop="PLC" :index="indexMethod" width="200px" />
            <el-table-column label="检验方式" align="center" prop="model" :index="indexMethod" width="200px" />
            <el-table-column label="校检值" align="center" prop="calibration" width="300px" />
            <el-table-column label="编辑" align="center">
              <template #default="scope">
                <el-button type="primary" @click="editProduct" size="small" :icon="Edit">编辑产品属性</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
</el-row>
</template>
<style scoped>
.row1{
  margin-left: 20px;
  margin-bottom: 10px;
  align-items: center;
}
</style>